package com.cx.abstractFactory.api.impl;

import com.cx.abstractFactory.api.ICacheAdapter;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;

/**
 * @Author:cxy
 * @Date:2022/3/21 21:36
 */
public class RedisCacheAdapter implements ICacheAdapter {


    private final ConcurrentHashMap<String, Object> redisMap = new ConcurrentHashMap<>();


    @Override
    public Object get(String key) {
        System.out.println("RedisCacheAdapter.get");
        return redisMap.get(key);
    }

    @Override
    public void set(String key, Object value, long time, TimeUnit timeUnit) {
        System.out.println("RedisCacheAdapter.set");
    }

    @Override
    public void del(String key) {
        System.out.println("RedisCacheAdapter.del");
    }
}
